package com.wm.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ResponseResult<T>{
    private int code;//响应码
    private String msg;//描述
    private T data; //数据

    public ResponseResult(T data) {
        this(200,"suc",data);
    }

    public ResponseResult(int code, String msg) {
        this(code,msg,null);
    }

    public static final ResponseResult SUCCESS=new ResponseResult(200,"SUC", null);
    public static final ResponseResult ERROR=new ResponseResult(500,"ERROR", null);
}
